package com.peoit.honeycomb.dto;

import com.peoit.honeycomb.domain.Comments;

/**
 * 评论DTO
 * 
 * @author shisheng.zheng
 *
 */
public class CommentsDto extends BaseDto {
	private String discussantName; // 评价人账号
	private String comments;// 评价内容
	private String avatar;// 用户头像

	public static CommentsDto toDto(Comments comments) {
		CommentsDto commentDto = new CommentsDto();
		commentDto.setDiscussantName(comments.getDiscussant().getUserName());
		commentDto.setComments(comments.getComments());
		commentDto.setAvatar(comments.getDiscussant().getAvatar());
		return commentDto;
	}

	public String getDiscussantName() {
		return discussantName;
	}

	public void setDiscussantName(String discussantName) {
		this.discussantName = discussantName;
	}

	public String getComments() {
		return comments;
	}

	public void setComments(String comments) {
		this.comments = comments;
	}

	public String getAvatar() {
		return avatar;
	}

	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}

}
